package com.sunday.boot3.user.center.pojo.dto.role.permissions;

import com.sunday.common.core.gson.GsonUtils;
import com.sunday.common.core.remoting.base.page.PageDTO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Description: 角色权限关系表 请求 DTO
 * @author: zsy
 * @Create: 2024/09/20 15:13:07
 */
@Data
@NoArgsConstructor
public class PageRolePermissionsReqDTO extends PageDTO {

    public PageRolePermissionsReqDTO(long current, long pageSize) {
        super(current, pageSize);
    }

    /**
     * 主键
     */
    private Long id;

    /**
     * 角色ID
     */
    private Long roleId;

    /**
     * 权限ID
     */
    private Long permissionsId;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    public static PageRolePermissionsReqDTO of(long current, long pageSize) {
        return new PageRolePermissionsReqDTO(current, pageSize);
    }

    @Override
    public String toString() {
        return GsonUtils.DEFAULT.toJson(this);
    }

}
